﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AsyncPersistence.Entities;
using System.Linq.Expressions;

namespace AsyncPersistence.Services
{
    public interface IPersistenceService
    {
        bool Save(PersistableEntity persistableEntity);
        bool Save(IEnumerable<PersistableEntity> persistableEntities);
        bool Delete(IEnumerable<PersistableEntity> persistableEntities);
        bool Delete(PersistableEntity persistableEntity);
        IList<T> FetchListByQueryOver<T>(bool forceDbRead, Expression<Func<T, bool>> whereExpression) where T : PersistableEntity;
    }
}
